<%@ page language="java" pageEncoding="UTF-8"%>

<html>
<head>
	<meta http-equiv="content-type" content="text/html;">
	<%@include file="/views/common/include/taglib.jsp"%>
	<%@include file="/views/common/include/head.jsp"%>
	<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
	<script src="${ctx}/js/controllers/base/ownerHouse/ownerHouseEditController.js" type="text/javascript"></script>
<style type="text/css">
.selectCell{
	padding:8px 0px 8px 8px;
}
.selectHouse{
	padding:8px 0px 8px 8px;
}
.houseOwner{
	padding:8px 0px 8px 8px;
}
.state{
	padding:8px 0px 8px 8px;
}
.memo{
	padding:8px 0px 8px 8px;
}
select{
	width:120px;
}
button{
	border:none;
	height:30px;
	line-height:30px;
	margin-top:40px;
	padding-left:10px;
	padding-right:10px;
	width: 80px;
	font-size:15px;
	font-weight:700;
}
input{
	height:30px;
	line-height:30px;
	border:1px solid #ccc;
	text-indent:5px;
	font-family: '微软雅黑';
}
</style>
</head>

<body>
	<div class="selectCell">
		<span class="cell" style="display:inline;font-family: '微软雅黑';">小区：</span>	
		<div class="flEdit" style="display:inline">
			<select id="province" onblur="checkProvinceName()"  style="height:30px;line-height: 30px;margin-top: 4px;">  
	   			<option value="">--省--</option> 
	   			<c:forEach items="${provinceList}" var="provinceItem" varStatus="status">
	   				<c:if test="${provinceItem.regionName == cellInfo.provinceName}">
	    				<option id="${provinceItem.regionName}" value="${provinceItem.id}" selected>
	    					${provinceItem.regionName}
	    				</option>
	   				</c:if>
	   				<c:if test="${provinceItem.regionName != cellInfo.provinceName}">
	    				<option id="${provinceItem.regionName}" value="${provinceItem.id}">
	    					${provinceItem.regionName}
	    				</option>
	   				</c:if>
	   			</c:forEach>
	 			</select>
			<select id="city" onblur="checkCityName()"  style="height:30px;line-height: 30px;">
	   			<option value="">--市--</option>
	   			<c:if test="${not empty cityList}">
	   				<c:forEach items="${cityList}" var="cityItem" varStatus="status">
	   				<c:if test="${cityItem.regionName == cellInfo.cityName}">
	    				<option id="${cityItem.regionName}" value="${cityItem.id}" selected>
	    					${cityItem.regionName}
	    				</option>
	   				</c:if>
	   				<c:if test="${cityItem.regionName != cellInfo.cityName}">
	   				<option id="${cityItem.regionName}" value="${cityItem.id}">
	   					${cityItem.regionName}
	   				</option>
	  				</c:if>
	  				</c:forEach>
	   			</c:if>
	  		</select>
	        <select id="district" onblur="checkAreaName()" style="height:30px;line-height: 30px;">
	 			<option value="">--区--</option>
	 			<c:if test="${not empty districtList}">
	 				<c:forEach items="${districtList}" var="districtItem" varStatus="status">
	 				<c:if test="${districtItem.regionName == cellInfo.areaName}">
	  				<option id="${districtItem.regionName}" value="${districtItem.id}" selected>
	  					${districtItem.regionName}
	  				</option>
	 				</c:if>
	 				<c:if test="${districtItem.regionName != cellInfo.areaName}">
	 				<option id="${districtItem.regionName}" value="${districtItem.id}">
	 					${districtItem.regionName}
	 				</option>
					</c:if>
					</c:forEach>
	 			</c:if>
	       </select>
	       
				<select id="cellInfoId" onblur="checkCellInfo();" style="height:30px;">  
				<option value="">--小区--</option> 
				<c:forEach items="${cellList}" var="cellInfo" varStatus="status">
				<c:if test="${cellInfo.id == cellHouse.cellId}">
					<option id="${cellInfo.id}" value="${cellInfo.id}" selected>
						${cellInfo.cellName}
					</option>
				</c:if>
				<c:if test="${cellInfo.cellName != cellHouse.cellName}">
					<option id="${cellInfo.cellName}" value="${cellInfo.id}">
						${cellInfo.cellName}
			    </option>
				</c:if>
				</c:forEach>
				 </select>
				<span style="color:red">*</span>
			</div>
		</div>
       <div class="selectHouse">
			<span class="col-sm-1 editlableEdit" style="display:inline;font-family: '微软雅黑';">房屋：</span>
			<div class="flEdit" style="display:inline">
				
				<select id="cellRegionId" onblur="checkCellRegion();" style="height:30px;">
				<option value="">--区域--</option>
				<c:if test="${not empty cellRegions}">
					<c:forEach items="${cellRegions}" var="cellRegion" varStatus="status">
					<c:if test="${cellRegion.name == cellHouse.regionName}">
						<option id="${cellRegion.name}" value="${cellRegion.id}" selected>
							${cellRegion.name}
						</option>
					</c:if>
					<c:if test="${cellRegion.name != cellHouse.regionName}">
					<option id="${cellRegion.name}" value="${cellRegion.id}">
						${cellRegion.name}
		   				</option>
		  				</c:if>
		  				</c:forEach>
		   			</c:if>
				</select>
				<select id="cellBuildingId" onblur="checkCellBuilding();" style="height:30px;">
				<option value="">--楼栋--</option>
				<c:if test="${not empty cellBuildings}">
					<c:forEach items="${cellBuildings}" var="cellBuilding" varStatus="status">
					<c:if test="${cellBuilding.buildingName == cellHouse.buildingName}">
						<option id="${cellBuilding.buildingName}" value="${cellBuilding.id}" selected>
							${cellBuilding.buildingName}
						</option>
					</c:if>
					<c:if test="${cellBuilding.buildingName != cellHouse.buildingName}">
					<option id="${cellBuilding.buildingName}" value="${cellBuildings.id}">
						${cellBuilding.buildingName}
		   				</option>
		  				</c:if>
		  				</c:forEach>
		   			</c:if>
				</select>
				<select id="cellUnitId" onblur="checkCellUnit();" style="height:30px;">
				<option value="">--单元--</option>
				<c:if test="${not empty cellUnits}">
					<c:forEach items="${cellUnits}" var="cellUnit" varStatus="status">
					<c:if test="${cellUnit.name == cellHouse.unitName}">
						<option id="${cellUnit.name}" value="${cellUnit.id}" selected>
							${cellUnit.name}
						</option>
					</c:if>
					<c:if test="${cellUnit.name != cellHouse.unitName}">
					<option id="${cellUnit.name}" value="${cellUnit.id}">
						${cellUnit.name}
						</option>
					</c:if>
					</c:forEach>
					</c:if>
				</select>
				<select id="cellHouseId" onblur="checkName();" style="height:30px;">
				<option value="">--房屋--</option>
				<c:if test="${not empty cellHouses}">
					<c:forEach items="${cellHouses}" var="cellHouse" varStatus="status">
						<option id="${cellHouse.name}" value="${cellHouse.id}" selected>
							${cellHouse.name}
						</option>
					</c:forEach>
					</c:if>
				</select>
				<span style="color:red">*</span>
			</div>
		</div>
		<div class="memo" style="font-family: '微软雅黑';">备注：
			<input style="width:507px;" id="memo"/> 
		</div>
		<div class="houseOwner" style="font-family: '微软雅黑';">业主：
		<input style="width:120px;" id="userName" value="${user.username}" disabled="disabled"/>
		<input id="ownerId" value="${ownerId}" type="hidden" />
		</div>
		
		<div class="state" style="font-family: '微软雅黑';">状态：
		<input style="width:120px;" id="userName" value="新申请" disabled="disabled"/>
		<input id="state" value="1" type="hidden" />
		<%-- <select id="state"  style="height:30px;">
                <option value="" <c:if test="${state == null }">selected="selected" </c:if>>--状态--</option> 
		        <c:forEach items="${ownerHouseStates}" var="item" varStatus="cStatus">
		         
			        <option value="${item.value}" <c:if test="${item.value == state}">selected="selected"</c:if>>${item.label}</option>
	            
	            </c:forEach>
	            </select> --%>
		</div>
		
		<div class="foot">
			<div style="float:left;margin-left:40%;">
				<button style="color: #fff; background:#7ECFE0;" class="buttonEdit" onclick="saveOrUpdateOwnerHouse();">保&nbsp;&nbsp;存</button>
			</div>
			<div style="float:left;padding-left:1%;margin-left:10px;">
				<button style="color: #7ECFE0; background:#fff;border:1px solid #7ECFE0;" class="buttonCancle" onclick="Back();">取&nbsp;&nbsp;消</button>
			</div>
		</div>

<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
</script>
</body>
</html>